#include <stdio.h>
#include <string.h>

int isdouble(const char *s)
{
    int i = 0, count = 0;
    while (s[i] != '\0')
    {
        if(s[i] == '{')
        {
            count++;
            i++;
            continue;
        }
        if(s[i] == '}')
        {
            count--;
            if (count < 0) break;
        }
        i++;
    }
    return count;
}

int main(int argc, char *argv[])
{
    int i;
    if(argc < 2)
    {
        printf("ERROR: you need cmd like: ./dblcmp ....");
    }
    else
    {
        i = isdouble(argv[1]);
        if(i == 0)
            printf("yes\n");
        else
            printf("no\n");
    }
    return 0;
}
